/**
 * Project Name:TradeController.java
 * File Name:TradeController.java
 * Date:2018/8/1 下午3:08
 * Copyright (c) 2018, zhang.xiangyu@foxmail.com All Rights Reserved.
*/
package com.meatball.base.pay.trade.controller;

import com.meatball.base.pay.trade.model.PayTrade;
import com.meatball.base.pay.trade.service.TradeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Title: TradeController.java
 * @Description: todo(交易)
 * @Author 張翔宇
 * @Date 2018/8/1 下午3:08
 * @Version V1.0
 */
@Controller
@RequestMapping("/pay/trade")
public class TradeController {
    @Resource
    private TradeService service;

    /**
     * @Title: index
     * @Description: todo(主页)
     * @Params:
     * @Return     返回类型
     * @Author 張翔宇
     * @Date 2018/8/1 下午3:10
     */
    @GetMapping("/index")
    public String index() {
        return "pay/trade/Trade";
    }

    /**
     * @Title: table
     * @Description: todo(列表)
     * @Params: record
     * @Return     返回类型
     * @Author 張翔宇
     * @Date 2018/8/1 下午3:17
     */
    @GetMapping("/table")
    @ResponseBody
    public Map<String, Object> table(PayTrade record) {
        return service.table(record);
    }
}
